package com.weakteam.androidclient.util;

import android.content.Context;
import android.os.Environment;
import android.util.Log;

import java.io.File;

/**
 * @author Nail
 */
public class MainProperties {

    public static String LOG_TAG = "android-client";

    private static MainProperties instance;

    private String ip;
    private String port;
    private String appName;
    private String rootURL;

    private File picturesFolder;

    public static MainProperties getInstance() {
        if (instance == null) instance = new MainProperties();
        return instance;
    }

    public String getRootURL() {
        return this.rootURL;
    }
    public File getPicturesFolder(Context context) {
        if (this.picturesFolder == null) {
            this.picturesFolder = context.getDir("pictures", Context.MODE_PRIVATE);
        }
        return this.picturesFolder;
    }

    private MainProperties() {
        this.ip = "nailsharipov.asuscomm.com";
        this.port = "8080";
        this.appName = "WebClient";
        this.rootURL = "http://" + ip + ":" + port + "/" + appName + "/";
    }


}
